#ifndef MONITORWORK_H
#define MONITORWORK_H

#include <QObject>
#include <QNetworkAccessManager>

class MonitorWork : public QObject
{
    Q_OBJECT
public:
    explicit MonitorWork(QObject *parent = nullptr);

public slots:
    void fnMqttSubscribe();
    void fnHasOptionPasswd();
    void fnMqttUnsubscribed();
    void fnReturnVersion();
    void fnCleanInvalidDevice(QStringList);
    void fnCheckNewVersion(bool);

private:
    QNetworkAccessManager *m_networkManager;
    void fnHttpRequest(QJsonObject httpParameter,
                       QString &errMessage,
                       QString &reqResult);

signals:
    void infoOccurred(QStringList);
    void versionReceived(float version);
    void reqSystemVersion(bool);
};

#endif // MONITORWORK_H
